package com.ruoyi.bbs.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bbs.mapper.BbsSettingMapper;
import com.ruoyi.bbs.domain.BbsSetting;
import com.ruoyi.bbs.service.IBbsSettingService;

/**
 * 社区设置Service业务层处理
 * 
 * @author saruri
 * @date 2024-10-02
 */
@Service
public class BbsSettingServiceImpl implements IBbsSettingService 
{
    @Autowired
    private BbsSettingMapper bbsSettingMapper;

    /**
     * 查询社区设置
     * 
     * @param settingKey 社区设置主键
     * @return 社区设置
     */
    @Override
    public BbsSetting selectBbsSettingBySettingKey(String settingKey)
    {
        return bbsSettingMapper.selectBbsSettingBySettingKey(settingKey);
    }

    /**
     * 查询社区设置列表
     * 
     * @param bbsSetting 社区设置
     * @return 社区设置
     */
    @Override
    public List<BbsSetting> selectBbsSettingList(BbsSetting bbsSetting)
    {
        return bbsSettingMapper.selectBbsSettingList(bbsSetting);
    }

    /**
     * 新增社区设置
     * 
     * @param bbsSetting 社区设置
     * @return 结果
     */
    @Override
    public int insertBbsSetting(BbsSetting bbsSetting)
    {
        return bbsSettingMapper.insertBbsSetting(bbsSetting);
    }

    /**
     * 修改社区设置
     * 
     * @param bbsSetting 社区设置
     * @return 结果
     */
    @Override
    public int updateBbsSetting(BbsSetting bbsSetting)
    {
        return bbsSettingMapper.updateBbsSetting(bbsSetting);
    }

    /**
     * 批量删除社区设置
     * 
     * @param settingKeys 需要删除的社区设置主键
     * @return 结果
     */
    @Override
    public int deleteBbsSettingBySettingKeys(String[] settingKeys)
    {
        return bbsSettingMapper.deleteBbsSettingBySettingKeys(settingKeys);
    }

    /**
     * 删除社区设置信息
     * 
     * @param settingKey 社区设置主键
     * @return 结果
     */
    @Override
    public int deleteBbsSettingBySettingKey(String settingKey)
    {
        return bbsSettingMapper.deleteBbsSettingBySettingKey(settingKey);
    }
}
